import request from '@/utils/request'

// 查询厂家列表
export function listPost(query) {
  return request({
    url: '/drug/factory/list',
    method: 'get',
    params: query
  })
}

// 查询厂家详细
export function getPost(postId) {
  return request({
    url: '/drug/factory/' + postId,
    method: 'get'
  })
}

// 新增厂家
export function addPost(data) {
  return request({
    url: '/drug/factory',
    method: 'post',
    data: data
  })
}

// 修改厂家
export function updatePost(data) {
  return request({
    url: '/drug/factory',
    method: 'put',
    data: data
  })
}

// 删除厂家
export function delPost(postId) {
  return request({
    url: '/drug/factory/' + postId,
    method: 'delete'
  })
}

// 导出厂家
export function exportPost(query) {
  return request({
    url: '/drug/factory/export',
    method: 'get',
    params: query
  })
}
